# PHP libxml Functions

« Previous
Next Chapter »

## PHP libxml Introduction

The libxml functions and constants are used together with SimpleXML, XSLT and DOM functions.

## Installation

These functions require the libxml package. Download at xmlsoft.org

## PHP libxml Functions

PHP: indicates the earliest version of PHP that supports the function.

Function | Description | PHP
--- | --- | ---
libxml_clear_errors() | Clear libxml error buffer | 5
libxml_get_errors() | Retrieve array of errors | 5
libxml_get_last_error() | Retrieve last error from libxml | 5
libxml_set_streams_context() | Set the streams context for the next libxml document load or write | 5
libxml_use_internal_errors() | Disable libxml errors and allow user to fetch error information as needed | 5

## PHP libxml Constants

Function | Description | PHP
--- | --- | ---
LIBXML_COMPACT | Set small nodes allocation optimization. This may improve the application performance | 5
LIBXML_DTDATTR | Set default DTD attributes | 5
LIBXML_DTDLOAD | Load external subset | 5
LIBXML_DTDVALID | Validate with the DTD | 5
LIBXML_NOBLANKS | Remove blank nodes | 5
LIBXML_NOCDATA | Set CDATA as text nodes | 5
LIBXML_NOEMPTYTAG | Change empty tags (e.g. <br/> to <br></br>), only available in the DOMDocument->save() and DOMDocument->saveXML() functions | 5
LIBXML_NOENT | Substitute entities | 5
LIBXML_NOERROR | Do not show error reports | 5
LIBXML_NONET | Stop network access while loading documents | 5
LIBXML_NOWARNING | Do not show warning reports | 5
LIBXML_NOXMLDECL | Drop the XML declaration when saving a document | 5
LIBXML_NSCLEAN | Remove excess namespace declarations | 5
LIBXML_XINCLUDE | Use XInclude substitution | 5
LIBXML_ERR_ERROR | Get recoverable errors | 5
LIBXML_ERR_FATAL | Get fatal errors | 5
LIBXML_ERR_NONE | Get no errors | 5
LIBXML_ERR_WARNING | Get simple warnings | 5
LIBXML_VERSION | Get libxml version (e.g. 20605 or 20617) | 5
LIBXML_DOTTED_VERSION | Get dotted libxml version (e.g. 2.6.5 or 2.6.17) | 5

« Previous
Next Chapter »

### WEB HOSTING

UK Reseller Hosting

### WEB BUILDING

FREE Website BUILDER Free HTML5 Templates

### W3SCHOOLS EXAMS

HTML, CSS, JavaScript, PHP, jQuery, XML, and ASP Certifications

### SHARE THIS PAGE

### Color Picker

### HTML/CSS

HTML Tutorial HTML5 Tutorial CSS Tutorial CSS3 Tutorial Bootstrap Tutorial

### JavaScript

JavaScript Tutorial jQuery Tutorial jQuery Mobile Tutorial AngularJS Tutorial AJAX Tutorial JSON Tutorial

### Graphics

Canvas Tutorial SVG Tutorial Google Maps Tutorial

### Server Side

SQL Tutorial PHP Tutorial ASP Tutorial ASP.NET Tutorial VBScript Tutorial AppML Tutorial

### Web

Web Building Web Statistics Web Certification

### XML

XML Tutorial DTD Tutorial Schema Tutorial XML DOM Tutorial XPath Tutorial XSLT Tutorial XQuery Tutorial XSL-FO Tutorial RSS Tutorial WSDL Tutorial

### HTML/CSS

HTML Tag Reference HTML Event Reference HTML Color Reference CSS 1,2,3 Reference Bootstrap Reference

### JavaScript

JavaScript Reference HTML DOM Reference jQuery Reference jQuery Mobile Reference Google Maps Reference

### Server Side

PHP Reference SQL Reference ASP Reference VBScript Reference Razor Reference ASP.NET Reference

### XML

XML DOM Reference XSLT Reference XSL-FO Reference XPath Reference XQuery Reference Schema Reference RSS Reference SVG Reference

### HTML Charsets

HTML Character Sets HTML ASCII HTML ANSI HTML Windows-1252 HTML ISO-8859-1 HTML Symbols HTML UTF-8

### HTML/CSS

HTML Examples CSS Examples

### Browser Scripting

JavaScript Examples HTML DOM Examples jQuery Examples jQuery Mobile Examples AngularJS Examples AJAX Examples

### Server Scripting

PHP Examples ASP Examples VBScript Examples Razor Examples .NET Examples

### XML Languages

XML Examples DTD Examples XML DOM Examples XSL Examples XSLT Examples XPath Examples XQuery Examples Schema Examples RSS Examples SVG Examples